<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp"%>
<!DOCTYPE HTML>
<html>
	<head>
		<title>品牌管理 - 商城后台</title>
		<%@ include file="/common/include/title.jsp"%>
		
		<script language="javascript" type="text/javascript" src="${rootpath }/common/resource/My97DatePicker/WdatePicker.js"></script>
	</head>
	<body>
		<nav class="breadcrumb">
			<i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>
			产品管理 <span class="c-gray en">&gt;</span> 品牌管理 <a
				class="btn btn-success radius r mr-20"
				style="line-height: 1.6em; margin-top: 3px"
				href="javascript:location.replace(location.href);" title="刷新"><i
				class="Hui-iconfont">&#xe68f;</i></a>
		</nav>
		<div class="pd-20">
			<div class="text-c">
				<form class="Huiform" method="post" action="${rootpath }/back/goods/brandList.htm" target="_self">
					<input type="text" name="keyword" placeholder="关键字" value="${requestScope.keyword }" class="input-text"
						style="width: 120px">
					<span class="select-box" style="width: 150px">
						<select class="select" name="status" size="1">
							<option value="1" ${requestScope.status == '1' ? 'selected' : '' }>启用</option>
							<option value="0" ${requestScope.status == '0' ? 'selected' : '' }>禁用</option>
						</select>
					</span>
					<input name="st" value="${requestScope.st }" class="input-text" style="width:150px;" type="text" placeholder="起始时间" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})">
					<input name="ed" value="${requestScope.ed }" class="input-text" style="width:150px;" type="text" placeholder="结束时间" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})">
					<button type="submit" class="btn btn-success" id="" name="">
						搜索
					</button>
				</form>
			</div>
			<div class="cl pd-5 bg-1 bk-gray mt-20">
				<span class="l">
					<a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i>
						批量删除</a>
					<a href="#" onclick="brand_add('品牌添加','${rootpath }/back/goods/brandInsert.htm')" class="btn btn-success">添加</a>
					<a href="#" onclick="brand_update('品牌更新','${rootpath}/back/goods/brandUpdate.htm?bid=${goods.id}','1')" class="btn btn-success">更新</a>
				</span>
						
				<span class="r">共有数据：<strong>54</strong> 条
				</span>
			</div>
			<div class="mt-20">
				<table class="table table-border table-bordered table-bg table-sort">
					<thead>
						<tr class="text-c">
							<th width="25"><input type="checkbox" name="" value=""></th>
							<th width="70">Id</th>
							<th width="80">管理员</th>
							<th width="120">名称</th>
							<th width="150">LOGO</th>
							<th width="150">网址</th>
							<th width="80">状态</th>
							<th width="150">创建时间</th>
							<th width="150">更新时间</th>
							<th width="150">发布时间</th>
							<th width="100">操作</th>
						</tr>
					</thead>
					<tbody>
						<c:forEach items="${goodsBrandList }" var="goods" varStatus="stat">
							<tr class="text-c">
								<td><input name="" type="checkbox" value=""></td>
								<td>${goods.id }</td>
								<td>${goods.admins.trueName }</td>
								<td>${goods.name }</td>
								<td class="text-l"><img title="国内品牌" src="${websitePath}${goods.logoPath}" height="100" width="150"></td>
								<td class="text-l"><a href="${goods.website}" target="_blank">${goods.website}</a></td>
								<td class="text-l">${goods.statusStr }</td>
								<td><fmt:formatDate value="${goods.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
								<td><fmt:formatDate value="${goods.updateTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
								<td><fmt:formatDate value="${goods.pubTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
								<td class="f-14 product-brand-manage">
									<a style="text-decoration: none" onClick="brand_update('品牌编辑','${rootpath}/back/goods/brandUpdate.htm?bid=${goods.id}','1')"
										href="javascript:;" title="编辑">
										<i class="Hui-iconfont">&#xe6df;</i>
									</a>
									<a style="text-decoration: none" class="ml-5" onClick="active_del(this,'10001')" 
									href="javascript:;" title="删除">
										<i class="Hui-iconfont">&#xe6e2;</i>
									</a>
								</td>
							</tr>
						</c:forEach>
					</tbody>
				</table>
				
				<form action="${rootpath }/back/goods/brandList.htm" method="post" id="pageForm">
					<input type="hidden" name="keyword" value="${requestScope.keyword }">
					<input type="hidden" name="status" value="${requestScope.status }">
					<input type="hidden" name="st" value="${requestScope.st }">
					<input type="hidden" name="ed" value="${requestScope.ed }">
					<div class="dataTables_info" id="DataTables_Table_0_info" role="status"
						aria-live="polite">共${requestScope.pageInfoUtil.totalRecord }条,共${requestScope.pageInfoUtil.totalPage }页
						<a href="#" onclick="return pageInfoSubmit('pageForm','currentPage','1','pageSize','${requestScope.pageInfoUtil.pageSize }')">首页</a>
						<a href="#" onclick="return pageInfoSubmit('pageForm','currentPage','${requestScope.pageInfoUtil.prePage }','pageSize','${requestScope.pageInfoUtil.pageSize }')">上一页</a>
						<a href="#" onclick="return pageInfoSubmit('pageForm','currentPage','${requestScope.pageInfoUtil.nextPage }','pageSize','${requestScope.pageInfoUtil.pageSize }')">下一页</a>
						<a href="#" onclick="return pageInfoSubmit('pageForm','currentPage','${requestScope.pageInfoUtil.totalPage }','pageSize','${requestScope.pageInfoUtil.pageSize }')">尾页</a>
						第<input type="text" name="currentPage" id="currentPage" value="${requestScope.pageInfoUtil.currentPage }" size="5"/>页
						每页<input type="text" name="pageSize" id="pageSize" value="${requestScope.pageInfoUtil.pageSize }" size="5"/>条
						<input type="submit" value="GO"/>
					</div>
				</form>
			</div>
		</div>
	</body>
</html>
<script type="text/javascript">
/*图片-添加*/
function brand_add(title,url){
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}

/* 品牌更新 */
function brand_update(title,url){
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}
</script>